<?xml version="1.0" encoding="UTF-8"?>
<!-- 
 Copyright (C) 2014 - 2016 Open Source Geospatial Foundation. All rights reserved.
 This code is licensed under the GPL 2.0 license, available at the root
 application directory.
 -->
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>
  <bean id="gwcWebExtension" class="org.geoserver.platform.ModuleStatusImpl">
    <constructor-arg index="0" value="gs-web-gwc"/>
    <constructor-arg index="1" value="GeoServer Web UI GeoWebCache"/>
  </bean>

  <bean id="wmtsServiceDescriptor" class="org.geoserver.gwc.web.GWCServiceDescriptionProvider">
    <constructor-arg ref="gwcFacade"/>
    <constructor-arg ref="geoServer"/>
  </bean>

  <bean id="gwcCategory" class="org.geoserver.web.Category">
    <property name="nameKey" value="category.tilecaching" />
    <property name="order" value="180" />
  </bean>
  
  <bean id="cachedLayersMenuPage" class="org.geoserver.web.MenuPageInfo">
    <property name="id" value="gwc.layers"/>
    <property name="titleKey" value="CachedLayersPage.title"/>
    <property name="descriptionKey" value="CachedLayersPage.description"/>
    <property name="componentClass" value="org.geoserver.gwc.web.layer.CachedLayersPage"/>
    <property name="category" ref="gwcCategory"/>
    <property name="icon" value="../tilelayer.png"/>
    <property name="order" value="1"/>
  </bean>
    
  <bean id="gwcSettingsMenuPage" class="org.geoserver.web.MenuPageInfo">
    <property name="id" value="gwc.settings"/>
    <property name="titleKey" value="GWCSettingsPage.menuTitle"/>
    <property name="descriptionKey" value="GWCSettingsPage.description"/>
    <property name="componentClass" value="org.geoserver.gwc.web.GWCSettingsPage"/>
    <property name="category" ref="gwcCategory"/>
    <property name="icon" value="geowebcache-16.png"/>
    <property name="order" value="2"/>
  </bean>
  
  <bean id="gridsetsMenuPage" class="org.geoserver.web.MenuPageInfo">
    <property name="id" value="gwc.gridsets"/>
    <property name="titleKey" value="GridSetsPage.title"/>
    <property name="descriptionKey" value="GridSetsPage.description"/>
    <property name="componentClass" value="org.geoserver.gwc.web.gridset.GridSetsPage"/>
    <property name="category" ref="gwcCategory"/>
    <property name="icon" value="../gridset.png"/>
    <property name="order" value="3"/>
  </bean>  
  
  <bean id="diskQuotaMenuPage" class="org.geoserver.web.MenuPageInfo">
    <property name="id" value="gwc.diskQuota"/>
    <property name="titleKey" value="DiskQuotaSettingsPage.title"/>
    <property name="descriptionKey" value="DiskQuotaSettingsPage.description"/>
    <property name="componentClass" value="org.geoserver.gwc.web.diskquota.DiskQuotaSettingsPage"/>
    <property name="category" ref="gwcCategory"/>
    <property name="icon" value="../diskquota.png"/>
    <property name="order" value="4"/>
  </bean>
    
  <bean id="blobStoresMenuPage" class="org.geoserver.web.MenuPageInfo">
    <property name="id" value="gwc.blobStores"/>
    <property name="titleKey" value="BlobStoresPage.title"/>
    <property name="descriptionKey" value="BlobStoresPage.description"/>
    <property name="componentClass" value="org.geoserver.gwc.web.blob.BlobStoresPage"/>
    <property name="category" ref="gwcCategory"/>
    <property name="icon" value="../blobstores.png"/>
    <property name="order" value="5"/>
  </bean>
  
  <bean id="layerCacheEditTabPanelInfo" class="org.geoserver.gwc.web.layer.LayerEditCacheOptionsTabPanelInfo">
    <property name="id" value="layerCacheEditTabPanelInfo"/>
    <property name="titleKey" value="LayerCacheOptionsTabPanel.title"/>
    <property name="descriptionKey" value="LayerCacheOptionsTabPanel.shortDescription"/>
    <property name="componentClass" value="org.geoserver.gwc.web.layer.LayerCacheOptionsTabPanel"/>
    <property name="order" value="200"/>
  </bean>

  <bean id="diskQuotaWarningProvider" class="org.geoserver.gwc.web.diskquota.DiskQuotaWarningProvider"/>
  
  <bean class="org.geoserver.gwc.web.blob.FileBlobStoreType" />

  <bean id="wmtsServicePage" class="org.geoserver.web.services.ServiceMenuPageInfo">
    <property name="id" value="wmts"/>
    <property name="titleKey" value="wmts.title"/>
    <property name="descriptionKey" value="wmts.description"/>
    <property name="componentClass" value="org.geoserver.gwc.web.wmts.WMTSAdminPage"/>
    <property name="icon" value="server_tile_map.png"/>
    <property name="category" ref="servicesCategory"/>
    <property name="serviceClass" value="org.geoserver.gwc.wmts.WMTSInfo"/>
  </bean>

  <!-- Used for workspace-based demo requests so the requests to GS stay workspace-based -->
  <bean id="gwcDemoUrlHandlerMapping" class="org.geoserver.gwc.controller.GwcUrlHandlerMapping">
    <constructor-arg ref="catalog" />
    <constructor-arg value="/gwc/demo"/>
    <property name="alwaysUseFullPath" value="true" />
    <property name="order" value="10" />
  </bean>

  <!-- Used for workspace-based web requests (i.e. for rest/web/openlayer/ol.js) -->
  <bean id="gwcRestWebUrlHandlerMapping" class="org.geoserver.gwc.controller.GwcUrlHandlerMapping">
    <constructor-arg ref="catalog" />
    <constructor-arg type="java.lang.String"  value="/gwc/rest/web"/>
    <property name="alwaysUseFullPath" value="true" />
    <property name="order" value="10" />
  </bean>

</beans>
